<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>这是判断是否为回文串的代码</title>
</head>
<body>
<script>
  function palindrome(message){
    var str2 = message.split("").reverse().join("");
    return str2 === message;}
  document.write(palindrome('hello')+"<br/>");// should return false
  document.write(palindrome('abcba')); // should return true
</script>
</body>
</html>